<#assign menuId=5>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>所有订单-${Application.systemName!}</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="../css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="../css/AdminLTE.css" rel="stylesheet" type="text/css" />

        <link href="../css/myself.css" rel="stylesheet" type="text/css" />
        <!-- <link rel="stylesheet" href="../css/reset.css" /> --> 
        <script type="text/javascript" src="../js/lib/jquery.min.js"></script>


        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
		</script>
		<style type="text/css">
			#more{
				display: inline-block; 
				margin-left: 25px;
				margin-top: 10px;
			}
			#more a{
				font-weight: bold;
				color: #3882FF;
			}
			.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
			    vertical-align: middle;
			}
			.gongchang{
				display: inline-block;
				width: 15%;
				text-align: right;
				font-weight: bold;
			}
			.table{
				margin-bottom: 10px;
			}
			.dropdown-menu {
			    left: 50%;
			    margin-left: -50px;
			    min-width: 100px;
			}
			i{
				cursor: pointer;
			}
			.bule-border{
				margin-bottom: 5px;
			}
		
			 
			
		</style>
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <#include "../header.html"/>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <#include "../menu.html" />

            <!-- Right side column. Contains the navbar and content of the page -->
           <aside class="right-side">
           	<section class="content-header">
                    <h1>所有订单</h1>
                    <hr style="margin: 10px 0 0 0" />
            </section>
            <section class="content">
            	<div class="row">
            		<div class="col-md-12">
            			<div class="box">
				            <div class="clearfix search-div center">
				            	<div class="search1">
					            	<form action="list" method="post"> 
							       		<ul style="padding: 0"> 
							       			<li>
												<input type="text" name="customerName" value="${customerName!}" placeholder="请输入客户名称" />
							       			</li>
							       			<li>
												<select name="orderType" id="orderType">
													<option value="">全部订单</option>
													<option value="T1">设计订单</option>
													<option value="T2">打样订单</option>
													<option value="T3">大货订单</option>
												</select>
												
							       			</li>
							       			<li>
												<input type="text" name="code" value="${code!}" placeholder="请输入订单编号" />
							       			</li>
							       		 
							       			<li>
							       				<div>
				                                    <button type="submit" class="btn btn-primary btn-sm">搜索</button>
		                                		</div>
							       			</li>
							       		</ul>
							       		</form>
							       	</div> 
				            	
				         
						           	<table class="table table-bordered text-center">
						               	<tbody>
						                   	<tr>
						                       	<th style="border: none;" width="35%">
						                       		客户信息
						                       	</th>
						                       	<th style="border: none;" width="21%">款式数量</th>
						                       	<th style="border: none;" width="22%">项目人员</th>
						                       	<th style="border: none;" width="22%">订单状态
						                       	<!-- 
						                       		<div class="dropdown" style="cursor: pointer;">
														<div  class=" dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
															订单状态
															<i class="fa fa-angle-down" style="color: #3882FF; font-weight: bold;"></i>
														</div>
														<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
															<li role="presentation">
																<a role="menuitem" tabindex="-1" href="#">设计</a>
															</li>
															<li role="presentation">
																<a role="menuitem" tabindex="-1" href="#">打样</a>
															</li>
															<li role="presentation">
																<a role="menuitem" tabindex="-1" href="#">大货</a>
															</li>
															<li role="presentation">
																<a role="menuitem" tabindex="-1" href="#">已完成</a>
															</li>
														</ul>
													</div>
													 -->
						                       </th>
						                   </tr>
						               </tbody>
						           </table>
						           <#list orders as order>
						           <table class="table text-center table-bordered order-list">
						
					                   	<tr>
					                       	<td colspan="5" class="left-text" style="font-weight: bold;">
					                           <span>${order.createAt?string("yyyy-MM-dd")}</span>
					                           <span>订单号：
					                           <#if order.orderType=="T1">
					                           <a style="color: black;" href="../designorder/detail?businessId=${order.businessId!}&orderId=${order.id!}">${order.code!}</a>
					                           <#elseif order.orderType=="T2">
					                           <a style="color: black;" href="../proofingorder/detail?proofingPatternId=${order.businessId!}">${order.code!}</a>
					                           <#else>
					                           <a style="color: black;" href="../productionorder/detail?id=${order.businessId!}">${order.code!}</a>
					                           </#if>
					                           </span>
					                           <#if order.status lt 99>
					                           <#if order.enddateCnt?? && order.enddateCnt gt 0>
						                           <b class="fr six-font">剩余${order.enddateCnt!}天</b>
						                           <#elseif order.enddateCnt?? && order.enddateCnt lt 0>
						                           <b class="fr six-font red">超期${order.enddateCnt?abs}天</b>
						                           <#else>
						                           <b class="fr six-font">剩余${order.enddateCnt!}天</b>
						                           </#if>
						                          </#if>
					                       	</td>
					                   	</tr>
										<tr>
					                        <td width="35%" style="vertical-align: top;">
					                        	<#if order.customer.level=='V1'>
					                        	<i class="iconfont fl">&#xe6eb;</i>
					                        	</#if>
					                        	<#if order.customer.level=='V2'>
					                        	<i class="iconfont fl">&#xe6ed;</i>
					                        	</#if>
					                        	<#if order.customer.level=='V3'>
					                        	<i class="iconfont fl">&#xe6e9;</i>
					                        	</#if>
					                        	
					                            
					                            <div  class="order-text">
						                            <p>
						                            <a href="../customer/doShowCustomerDetailPage?id=${order.customer.id!}"><span id="name">${order.customer.fullname!}</span></a>
						                            <#if order.customer.web??><a href="${order.customer.web!}">
						                            	<i class="iconfont">&#xe6ee;</i>
						                            </a></#if>
						                        
						                            <#if order.customer.attachment?size!=0>
					                            <a class="download"><i class="iconfont" data-toggle="modal" data-target="#myModal1${order_index}">&#xe6ef;</i></a>
												
												
												<div id="myModal1${order_index}" class="modal fade"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
													<div class="modal-dialog down_load">
														<div class="modal-content">
															<div class="modal-header">
																<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
																	&times;
																</button>
																<h4 class="modal-title">
																	下载列表
																</h4>
															</div>
															<div class="modal-body">
																<ul>
																	<#list order.customer.attachment as attach>
																	<li>
																		<div class="clearfix">
																			<a href="../customer/downFile?filename=${attach.businessFile!}"><img class="pull-left" src="../img/file.png" style="width: 60px; height: 60px; border-radius: 10px;"/></a>
																			<span class="pull-left" title="${attach.businessFile?substring(13)!}">${attach.businessFile?substring(13)!}</span>
																		</div>
																	</li>
																    </#list>
																</ul>
															</div>
															<div class="modal-footer">
																<button type="button" class="btn btn-default" data-dismiss="modal">
																	关闭
																	<btton>
															</div>
														</div><!-- /.modal-content -->
													</div><!-- /.modal -->
												</div>
												</#if>
						                            </p>
						                            <p>产品分类：<span><#list order.customer.productCategory as category>${category!}&nbsp;</#list></span>目标人群：${order.customer.targetConsumer!}</p>
						                            <p>
						                            <#list order.customer.styleLabel as label>
						                            <span class="bule-border">${label!}</span>
						                            </#list>
						                            
						                            
						                            </p>
					                            </div>
					                        </td>
					                        <td width="21%">${order.count!}</td>
					                       	<td width="22%" style="text-align: left">
					                       	  <#if order.participants??>
					                       	  <#list order.participants as participant>
					                       	  <div style="text-align: left; padding-left:20%">${participant['roleName']!}：${participant['name']!}</div>
					                       		</#list>
					                       	  </#if>
					                       		
					                       	</td>
					                       	<td width="22%" class="word">
					  <#if order.status==10>待分配<#elseif order.status==11>设计中
				                		<#elseif order.status==12>待审核</#if>
				                		                     	
					                       		<#if order.status==30>待安排<#elseif order.status==31>待推码
				                		<#elseif order.status==32>生产中<#elseif order.status==32>待发货<#elseif order.status==34>待签收</#if>
				   	<#if order.status==20>待安排<#elseif order.status==21>待制版
				                		<#elseif order.status==22>打样中<#elseif order.status==23>待报价</#if>
				                		<#if order.status==99>已完成<#elseif order.status==100>已关闭</#if>
				                    			
					                       	</td>
					       				</tr>
						           </table>
						           </#list>
							    <div class="clearfix" style="margin: 20px 0;">
				                     <div class="box-footer clearfix">
                                    <ul class="pagination pagination-sm no-margin pull-right">
                                        <#if splitPage??> ${splitPage?replace("{url}","list?")}</#if>
                                    </ul>
                                </div>
				                </div>
				           	</div>
            			</div>
            		</div>
            	</div>
            </section>
            </aside><!-- /.right-side -->
            
           
            
        </div><!-- ./wrapper -->
        
        <style type="text/css">
        
        </style>
        <!-- jQuery 2.0.2 -->
        <script src="../js/jquery.min.js" type="text/javascript"></script>
        <!-- Bootstrap -->
        <script src="../js/bootstrap.min.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="../js/AdminLTE/app.js" type="text/javascript"></script>
        
        
       	<script type="text/javascript">
       	$("#orderType").val(${orderType!});
       		/* $('.search').hide();
       		
       		$("#dropdownMenu1").click(
				function(){
						if($('.search').css('display')=='none'){
							$('.search').show();
							$('.fa-angle-down').attr('class', 'fa fa-angle-up');
						}
						else{
							$('.search').hide();
							$('.fa-angle-up').attr('class', 'fa fa-angle-down');
						}
					}
				
			);   */
       		
			
		
			
       	</script>

    </body>
</html>
